package demo.proxy;

import java.lang.reflect.Proxy;

/**
 * @description:
 * @author: GX
 * @time: 2025/10/31 10:53
 */
public class test {
    public static void main(String[] args){
        BigStar s = new BigStar("杨超越");
        //类型star，这里是多态
        Star starBigStar = proxyUtil.createProxy(s);

        System.out.println("代理对象: " + starBigStar);
        System.out.println("代理对象类型: " + starBigStar.getClass().getName());
        System.out.println("是否是Star实例: " + (starBigStar instanceof Star));
        System.out.println("是否是BigStar实例: " + (starBigStar instanceof BigStar));
        System.out.println("是否是Proxy子类: " + (starBigStar instanceof Proxy));
        String rs = starBigStar.sing("难得有几个好兄弟");
        System.out.println(rs);
    }
}
